Page({
  data: {
    scoreHistory: [],
    scores: {
      wordChallenge: 40,
      wordDictation: 25,
      sentence: 30,
      invite: 20,
      signIn: 16
    }
  },

  onLoad() {
    // 计算总分
    const total = Object.values(this.data.scores).reduce((a, b) => a + b, 0);
    this.setData({
      totalScore: total
    });
  }
}); 